<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddTopRecommendedToGoodsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::table('goods', function(Blueprint $table)
		{
			//
            $table->tinyInteger('top_recommended')->default(0)->comment('是否顶部推荐');
            $table->tinyInteger('is_index')->default(0)->comment('是否首页展示');
            $table->tinyInteger('show_place')->default(0)->comment('首页展示位置');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('goods', function(Blueprint $table)
		{
			//
            $table->dropColumn('top_recommended');
            $table->dropColumn('is_index');
            $table->dropColumn('show_place');
		});
	}

}
